-- GENERATED SPELL FOR [Sathrovarr the Corruptor] --


function spell0_24892(pUnit, Event) --@Corrupting Strike,n/a--
pUnit:FullCastSpellOnTarget(45029,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24892', 3000, 1)
end

function spell1_24892(pUnit, Event) --@Curse of Boundless Agony,Self--
pUnit:FullCastSpellOnTarget(45032,pUnit)
pUnit:RegisterEvent('Sorts_24892', 30000, 1)
end

function spell2_24892(pUnit, Event) --@Shadow Bolt Volley,n/a--
pUnit:FullCastSpellOnTarget(45031,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24892', 1000, 1)
end

function Sorts_24892(pUnit, Event)
local choix_sorts_24892 = math.random(0, 2)
if choix_sorts_24892 == 0 then
pUnit:RegisterEvent('spell0_24892', 1, 1)
end
if choix_sorts_24892 == 1 then
pUnit:RegisterEvent('spell1_24892', 1, 1)
end
if choix_sorts_24892 == 2 then
pUnit:RegisterEvent('spell2_24892', 1, 1)
end
end

function mob24892_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24892', math.random(1500, 3000), 1)
end

function mob24892_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24892_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24892_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24892, 1, 'mob24892_Action')
RegisterUnitEvent(24892, 2, 'mob24892_Leave')
RegisterUnitEvent(24892, 3, 'mob24892_Kill')
RegisterUnitEvent(24892, 4, 'mob24892_Die')
